<extend name="Public/base"/>
<block name="head">
	 <link href="__NEW_CSS__/list.css" rel="stylesheet">
	  <link href="__CSS__/article.css" rel="stylesheet">
</block>
<block name="body">

	 <include file="Public:banner" />
	 <if condition="$config['INDEX_CONTENT'] eq 'article'">
	 	<if condition="$config['LAYOUT'] eq 'h'">
	 		<include file="Public:article_list_h" />
	 	<div class="container">
		 	<div class="row ">
				<div class="col-sm-12 ">
					<button id="next" class="btn" p="2" total-page="{$total_page}">
						点击加载更多
					</button>
				</div>
			</div>
	 	</div>
	 	<elseif condition="$config['LAYOUT'] eq 'v'"/>
	 		<include file="Public:article_list_v" />
	 	</if>
	 <elseif condition="$config['INDEX_CONTENT'] eq 'goods'"/>
	 	<div class="container">
		 	
		 	<notempty name="cate">
		 		<volist name="cate" id ="v">
		 			<div class="row cate">
		 				<h3>{$v.cate_name}</h3>
		 				<include file="Public:index_goods_list" />
		 			</div>
		 		</volist>
		 	</notempty>
			 
		 </div>
	 </if>
	 
	 
	 
	 
	 
</block>
<block name="script">
<script>
	 $(function(){   
		  $('#next').click(function(){
		  	LoadPage();  
		  });
		  $(".goods-list li").hover(
 				function(){
 				   //当鼠标放上去的时候,程序处理
 				   $(this).addClass("hover1 hover");
 				},
 				function(){
 				   //当鼠标离开的时候,程序处理
 				   $(this).removeClass("hover1 hover");
 		}); 
 		highlight_subnav("{:U('Index/index')}"); 
	}); 
	function LoadPage(){
		var currentPage = $('#next').attr('p') ? $('#next').attr('p') : 1;
		$.get("{:U('Index/ajaxNews')}",{p:currentPage},function(result){
			if(result.errno==0){
				$('.article .list').append(result.content);
				$('#next').attr('p',result.p);
				if(result.p>=$('#next').attr('total-page')){
					$('#next').html('木有了，亲');
					$('#next').attr('disabled',true);
					$('#next').addClass('disabled');
				}
			}
			
		},'json');	
	}
</script>	 
</block>